<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./LogInTemplate.xhtml">

            <ui:define name="top">
                <p:panel>
                <br/>
                <h1>
                    Create/Edit Scholarship...
                </h1>
                <br/>
                <br/>
                </p:panel>
            </ui:define>

            <ui:define name="content">
                <f:view>
                    <h:form>
                        <p:panel>
                            <p:growl/>
                            <h:panelGrid columns="2">
                                    <h:panelGrid columns="2">
                                        <p:outputLabel value="Scholarship Type:" for="scholarshipTipe" />
                                        <p:inputText id="scholarshipTipe" value="#{scholarshipBean.scholarship.scholarshipTipe}" title="ScholarshipTipe" required="true" requiredMessage="The ScholarshipTipe field is required." validatorMessage="Incorrect Data">
                                        <f:validateRegex pattern="^[A-Za-z\s]+$"/>
                                        </p:inputText>
                                        <p:outputLabel value="Description:" for="description" />
                                        <p:inputTextarea rows="4" cols="30" id="description" value="#{scholarshipBean.scholarship.description}" title="Description" required="true" requiredMessage="The Description field is required."/>
                                    </h:panelGrid>                    
                            </h:panelGrid>
                            <p:commandButton value="Register" action="ConfirmScholarship" ajax="false"/>
                            <p:commandButton value="Cancel" action="Scholarshiplist" immediate="true"/>
                        </p:panel>
                    </h:form>
                </f:view>            
            </ui:define>
        </ui:composition>
    </body>
</html>
